<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>{$title}</title>
<link rel="stylesheet" href="__PUBLIC__/xsd/css/mui.min.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/xsd/css/icons-extra.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/xsd/css/app.css?v1111121" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap/bootstrap.min.css"/>
{block name="style"}{/block}
</head>
<!--/head-->
<body>
<<<<<<< HEAD
	<script src="__PUBLIC__/js/jquery.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" charset="utf-8"></script>
    <script type="text/javascript" src="https://apis.map.qq.com/tools/geolocation/min?key=QQ6BZ-24HC6-ZAXSZ-MTZAU-5MU2J-HEFEH&referer=鲜果屋"></script>
=======
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" charset="utf-8"></script>
    <!-- <script type="text/javascript" src="https://apis.map.qq.com/tools/geolocation/min?key=QQ6BZ-24HC6-ZAXSZ-MTZAU-5MU2J-HEFEH&referer=鲜果屋"></script>
>>>>>>> 37581d8edb7a0b22980c59b2b5580e0a44b60b5e
<script>
//alert("cc");
		  var geolocation = new qq.maps.Geolocation();
     var options = {timeout: 9000};
        var positionNum = 0;
	geolocation.getLocation(showPosition, showErr, options);
	
	function showPosition(position) {
		
            positionNum ++;
            document.getElementById("demo").innerHTML += "序号：" + positionNum;
            document.getElementById("demo").appendChild(document.createElement('pre')).innerHTML = JSON.stringify(position, null, 4);
            document.getElementById("pos-area").scrollTop = document.getElementById("pos-area").scrollHeight;
        };
 
        function showErr() {
            positionNum ++;
            document.getElementById("demo").innerHTML += "序号：" + positionNum;
            document.getElementById("demo").appendChild(document.createElement('p')).innerHTML = "定位失败！";
            document.getElementById("pos-area").scrollTop = document.getElementById("pos-area").scrollHeight;
        };

	
<<<<<<< HEAD
</script>
=======
</script> -->
>>>>>>> 37581d8edb7a0b22980c59b2b5580e0a44b60b5e

	<!--/header-->
{block name="body"}{/block}


<!--/#footer-->



<script src="__PUBLIC__/js/bootstrap.js"></script>
<script src="__PUBLIC__/js/jquery.nanoscroller.min.js"></script>
<script src="__PUBLIC__/xsd/js/mui.min.js"></script>
<script src="__PUBLIC__/xsd/js/flexible.js"></script>
<script src="__PUBLIC__/xsd/js/template.js"></script>

{block name="script"}{/block}
{notempty name=":config('shop_hours')" }
<script>
  var time_range = function (beginTime, endTime) {
    var strb = beginTime.split (":");
    if (strb.length != 2) {
      return false;
    }

    var stre = endTime.split (":");
    if (stre.length != 2) {
      return false;
    }

    var b = new Date ();
    var e = new Date ();
    var n = new Date ();

    b.setHours (strb[0]);
    b.setMinutes (strb[1]);
    e.setHours (stre[0]);
    e.setMinutes (stre[1]);

    if (n.getTime () - b.getTime () > 0 && n.getTime () - e.getTime () < 0) {
      return true;
    } else {

      mui.alert("{:config('shop_hours_message')}", '公告');
      $('.mui-popup-buttons').html(' ')
      $('.mui-popup-inner').css('border-radius', '13px')
      return false;
    }
  }

  var shop_hours = "{:config('shop_hours')}";
  var hours_arr = shop_hours.split('-');
  time_range (hours_arr[0], hours_arr[1]);

</script>
{/notempty}

{eq name=":config('is_rest')" value="1"}
<script>
mui.alert("{:config('rest_message')}", '公告');
$('.mui-popup-buttons').html(' ')
$('.mui-popup-inner').css('border-radius', '13px')
</script>
{/eq}



<script>
  $(function(){
    $('.subsc').click(function(){
      // $.get("{:url('index/clearusersession')}", function(data){
      //   if(data.code == 1){
      //     window.location.href = "http://mp.weixin.qq.com/s/-AzpDTU7eAD24-R5QUP0wg"
      //   }
      // })
      //cookie('goodsmodel_id', $model_id);
      {switch name=":cookie('goodsmodel_id')" }
        {case value="1|2|21|22|3" }
            mui.alert("<img src={php}echo get_cover(config('frankserviceimg'), 'path');{/php} style='width:100%;'>", '长按扫二维码');
        {/case}

      {/switch}
      {notempty name="$contact_qc"}
            mui.alert('<img src="{$contact_qc}" style="width:100%;">', '长按扫二维码');
      {/notempty}
    })


    $('.endlimit').each(function(){
      var $this = $(this);
      var stime = $this.attr('data-endtime');
      var starttime = new Date(stime.replace(/-/g,"/"))
      setInterval(function () {
        var nowtime = new Date();
        var time = starttime - nowtime;
        if(time > 0){
          var day = parseInt(time / 1000 / 60 / 60 / 24);
          var hour = parseInt(time / 1000 / 60 / 60 % 24);
          var minute = parseInt(time / 1000 / 60 % 60);
          var seconds = parseInt(time / 1000 % 60);
          $this.html("距结束还有:<span style='color:red'>"+ day + "天" + hour + "小时" + minute + "分钟" + seconds + "秒</span>");
        }

      }, 1000);
    })

    $('.hidecartbtn').each(function(){
      var id = $(this).attr('data-id')
      $('.cartbtn'+id).hide();
    })


  })
</script>

 

 <!-- {empty name="Think.cookie.positioninit"}
 <script type="text/javascript" src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script>
 <script>
   $(function(){
    var geolocation = new qq.maps.Geolocation("QQ6BZ-24HC6-ZAXSZ-MTZAU-5MU2J-HEFEH", "鲜果屋");
     geolocation.getIpLocation(showPosition, showErr)

   })

   function showPosition(position) {
     console.log(1111);
     $.getJSON("{:url('index/cart/changecookie')}", {name: 'positioninit', 'val': position.lat+','+position.lng}, function(json, textStatus) {});
  };
   function showErr() {
     console.log('定位失败');
   };
 </script>
 {/empty} -->

</body>
</html>
